package team.se.tms.service;

import team.se.tms.dto.GroupDetail;
import team.se.tms.dto.Page;
import team.se.tms.dto.ProjectBasicDetail;
import team.se.tms.dto.ProjectDetail;
import team.se.tms.po.ProjectInfo;

import java.util.List;
import java.util.Map;

/**
 * 项目信息业务层接口,定义了项目信息业务层调用的方法
 *
 * @author winkyle
 * @date 2018/12/7
 */
public interface ProjectInfoService {
    /**
     * 根据授课id, 获取分组详情
     *
     * @param teachCourseId 授课id
     * @param page 分页
     * @return 分组详情
     * @throws Exception 异常
     * @create on 2018/12/7 by winkyle
     */
    List<GroupDetail> listGroupDetails(String teachCourseId, Page page) throws Exception;
    /**
     * 根据项目id部署项目
     *
     * @param projectId 项目id
     * @param projectAddress 项目地址
     * @return Boolean
     * @throws Exception 异常
     * @create on 2018/12/24 by sunddly
     */
    Boolean modifyProjectAddress(String projectId,String projectAddress) throws Exception;
    /**
     * 根据用户id和授课id查看我的项目信息
     *
     * @param teachCourseId 授课id
     * @param userId 用户id
     * @return List<ProjectInfo>
     * @throws Exception 异常
     * @create on 2019/1/3 by sunddly
     */
    List<ProjectInfo> listProjectInfo(String teachCourseId ,String userId)throws Exception;
    /**
     * 查看我的项目详情
     *
     * @param projectId 项目Id
     * @return List<ProjectBasicDetail> 项目详情列表
     * @throws Exception 异常
     * @create on 2018/12/30 by sunddly
     */
    ProjectBasicDetail getProjectBasicDetail(String projectId) throws Exception;

    /**
     * 查询项目详情
     * @param page
     * @return
     * @throws Exception
     * @create on 2018/12/27 by qingx
     */
    List<ProjectDetail> listAllProjectDetails(Page page) throws Exception;

    /**
     * 添加项目信息
     *
     * @param projectInfo
     * @param stuIds
     * @return
     * @throws Exception
     * @create on 2018/12/28 by qingx
     */
    boolean savaProjectInfo(ProjectInfo projectInfo, String[] stuIds) throws Exception;

    /**
     * 修改项目信息
     * @param projectInfo
     * @param stuIds
     * @return
     * @throws Exception
     * @create on 2018/12/29 by qingx
     */
    boolean modifyProject(ProjectInfo projectInfo, String[] stuIds) throws Exception;
}
